package org.jeecg.modules.htxincailiao.position.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.util.oConvertUtils;

/**
 * @Description: ht_position
 * @Author: jeecg-boot
 * @Date:   2022-07-14 10:00:46
 * @Version: V1.0
 */
@Data
@TableName("ht_position")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ht_position对象", description="ht_position")
public class HTPosition implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;
	/**发布标题*/
	@Excel(name = "发布标题", width = 15)
    @ApiModelProperty(value = "发布标题")
    private String title;
	/**学历*/
	@Excel(name = "学历", width = 15)
    @ApiModelProperty(value = "学历")
    private String education;
	/**职位分类*/
	@Excel(name = "职位分类", width = 15, dictTable = "ht_position_category", dicText = "name", dicCode = "id")
	@Dict(dictTable = "ht_position_category", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "职位分类")
    private String categoryId;
	/**职位名称*/
	@Excel(name = "职位名称", width = 15)
    @ApiModelProperty(value = "职位名称")
    private String name;
	/**排序*/
	@Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;
	/**首页排序*/
	@Excel(name = "首页排序", width = 15)
    @ApiModelProperty(value = "首页排序")
    private Integer homeSort;
	/**职位封面*/
	@Excel(name = "职位封面", width = 15)
    @ApiModelProperty(value = "职位封面")
    private String cover;
	/**职位描述*/
	@Excel(name = "职位描述", width = 15)
    @ApiModelProperty(value = "职位描述")
    private String introduction;
	/**职位要求*/
	@Excel(name = "职位要求", width = 15)
    @ApiModelProperty(value = "职位要求")
    private String content;
	/**发布日期*/
	@Excel(name = "发布日期", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发布日期")
    private Date releaseDate;
	/**截止日期*/
	@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "截止日期")
    private Date expireDate;
	/**公司名称*/
	@Excel(name = "公司名称", width = 15)
    @ApiModelProperty(value = "公司名称")
    @TableField(exist = false)
    private String enterpriseName;
	/**公司id*/
	@Excel(name = "公司id", width = 15)
    @ApiModelProperty(value = "公司id")
    private String enterpriseId;
	/**联系人*/
	@Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private String contactPerson;
	/**联系电话*/
	@Excel(name = "联系电话", width = 15)
    @ApiModelProperty(value = "联系电话")
    private String contactPhone;
	/**国家/地区ID*/
	@Excel(name = "国家/地区ID", width = 15)
    @ApiModelProperty(value = "国家/地区ID")
    private String regionId;
	/**省级ID*/
	@Excel(name = "省级ID", width = 15)
    @ApiModelProperty(value = "省级ID")
    private String provinceId;
	/**市级ID*/
	@Excel(name = "市级ID", width = 15)
    @ApiModelProperty(value = "市级ID")
    private String cityId;
	/**区ID*/
	@Excel(name = "区ID", width = 15)
    @ApiModelProperty(value = "区ID")
    private String districtId;
	/**街道地址*/
	@Excel(name = "街道地址", width = 15)
    @ApiModelProperty(value = "街道地址")
    private String streetAddress;
	/**楼/门牌号*/
	@Excel(name = "楼/门牌号", width = 15)
    @ApiModelProperty(value = "楼/门牌号")
    private String suiteAddress;
	/**是否为首页推荐 0-不推荐 1-推荐*/
	@Excel(name = "是否为首页推荐 0-不推荐 1-推荐", width = 15, dicCode = "is_home_recommended")
	@Dict(dicCode = "is_home_recommended")
    @ApiModelProperty(value = "是否为首页推荐 0-不推荐 1-推荐")
    private Integer isHomeRecommended;
	/**是否关于我们推荐：0-不推荐，1-推荐*/
	@Excel(name = "是否关于我们推荐：0-不推荐，1-推荐", width = 15, dicCode = "is_about_recommended")
	@Dict(dicCode = "is_about_recommended")
    @ApiModelProperty(value = "是否关于我们推荐：0-不推荐，1-推荐")
    private Integer isAboutRecommended;
	/**状态 0-招聘中，1-已完成，2-已过期*/
	@Excel(name = "状态 0-招聘中，1-已完成，2-已过期", width = 15, dicCode = "is_position_status")
	@Dict(dicCode = "is_position_status")
    @ApiModelProperty(value = "状态 0-招聘中，1-已完成，2-已过期")
    private Integer positionStatus;
	/**逻辑删除：1表示删除，0表示未删除。*/
	@Excel(name = "逻辑删除：1表示删除，0表示未删除。", width = 15)
    @ApiModelProperty(value = "逻辑删除：1表示删除，0表示未删除。")
    private Integer isDeleted;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**省ID*/
    @Excel(name = "岗位类型", width = 15)
    @ApiModelProperty(value = "岗位类型")
    @TableField(exist = false)
    private String categoryName;

    /**省ID*/
    @Excel(name = "省名", width = 15)
    @ApiModelProperty(value = "省名")
    @TableField(exist = false)
    private String provinceName;

    /**市ID*/
    @Excel(name = "市名", width = 15)
    @ApiModelProperty(value = "市名")
    @TableField(exist = false)
    private String cityName;
    /**区ID*/
    @Excel(name = "区名", width = 15)
    @ApiModelProperty(value = "区名")
    @TableField(exist = false)
    private String districtName;


    /**
     * 完整地址
     */
    @TableField(exist = false)
    private String fullAddress;

    public String getFullAddress() {
        String address = "";
        String separator = " ";
        if (oConvertUtils.isNotEmpty(this.provinceName)) {
            address += provinceName;
        }
        if (oConvertUtils.isNotEmpty(this.cityName)) {
            address += (separator + cityName);
        }
        if (oConvertUtils.isNotEmpty(this.districtName)) {
            address += (separator + districtName);
        }
        if (oConvertUtils.isNotEmpty(this.streetAddress)) {
            address += (separator + streetAddress);
        }
        if (oConvertUtils.isNotEmpty(this.suiteAddress)) {
            address += (separator + suiteAddress);
        }

        return address;
    };

    @TableField(exist = false)
    private Integer pageNo=1;

    @TableField(exist = false)
    private Integer pageSize=10;

    /**SEO关键字*/
    @Excel(name = "SEO关键字", width = 15)
    @ApiModelProperty(value = "SEO关键字")
    private String seoKeywords;


    /**SEO描述*/
    @Excel(name = "SEO描述", width = 15)
    @ApiModelProperty(value = "SEO描述")
    private String seoDescription;

}
